package com.dmsdbj.itoo.exception;

import com.dmsdbj.itoo.enums.ItooResultEnum;

import java.io.Serializable;

/**
 * 各服务异常类的父类
 */
public class ItooException extends RuntimeException implements Serializable {

    private Integer code;

    public ItooException(ItooResultEnum itooResultEnum) {
        super(itooResultEnum.getMessage());
        this.code = itooResultEnum.getCode();
    }

    public ItooException(Integer code, String message) {
        super(message);
        this.code = code;
    }


}
